import request from "@/utils/request.js";

const baseUrl = '/admin/order'

export const orderGetListService = (page, size, key) => {
    return request({
        url: `${baseUrl}/${page}/${size}`,
        method: 'GET',
        params: {key}
    })
}

export const getOrderCountService = () => {
    return request({
        url: `${baseUrl}/count`,
        method: 'GET'
    })
}

export const orderBatchRemove = (ids) => {
    return request({
        url: `${baseUrl}`,
        method: 'DELETE',
        data: ids
    })
}

export const orderUpdateService = (data) => {
    return request({
        url: `${baseUrl}`,
        method: 'PUT',
        data
    })
}

export const getMoneyCurrentMonthService = (data) => {
    return request({
        url: `${baseUrl}/currentMonth/money?year=${data.year}&month=${data.month}`,
        method: 'GET'
    })
}
export const getMoneyLatest10MonthService = (data) => {
    return request({
        url: `${baseUrl}/tenMonth/month?year=${data.year}&month=${data.month}`,
        method: 'GET'
    })
}
